<html>
<head><meta charset="utf-8"><title>build llvm failed at Mac OS 11.3.1 · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20llvm.20failed.20at.20Mac.20OS.2011.2E3.2E1.html">build llvm failed at Mac OS 11.3.1</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="237827098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20llvm%20failed%20at%20Mac%20OS%2011.3.1/near/237827098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shihao Xia <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20llvm.20failed.20at.20Mac.20OS.2011.2E3.2E1.html#237827098">(May 07 2021 at 13:58)</a>:</h4>
<p>After upgrading to new system (my MacBook Pro has x86 CPU), I met an error during LLVM compilation:<br>
.... compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:169:31: error: invalid application of 'sizeof' to an incomplete type 'struct stat64'<br>
<span aria-label="info" class="emoji emoji-2139" role="img" title="info">:info:</span>build   unsigned struct_stat64_sz = sizeof(struct stat64);</p>
<p>I suspected it is due to m1 changes (Arm has been added to Mac.sdk), any workaround for this issue?</p>
<p>A workaround has been proposed is doing LLVM configuration:</p>
<ul>
<li>-DLLVM_TARGETS_TO_BUILD="X86;AArch64;ARM;Mips"</li>
<li>-DLLVM_TARGETS_TO_BUILD="X86"</li>
</ul>
<p>How do we set this up in config.toml?</p>



<a name="237828345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20llvm%20failed%20at%20Mac%20OS%2011.3.1/near/237828345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20llvm.20failed.20at.20Mac.20OS.2011.2E3.2E1.html#237828345">(May 07 2021 at 14:06)</a>:</h4>
<p>there's an option for this in <code>config.toml</code> (see config.toml.example).</p>



<a name="237831653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20llvm%20failed%20at%20Mac%20OS%2011.3.1/near/237831653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shihao Xia <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20llvm.20failed.20at.20Mac.20OS.2011.2E3.2E1.html#237831653">(May 07 2021 at 14:28)</a>:</h4>
<p>-- Got ld supported ARCHES: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em<br>
-- Toolchain supported arches: armv6;armv7;armv7s;arm64;arm64e;arm64_32;i386;x86_64;x86_64h;armv6m;armv7k;armv7m;armv7em<br>
-- Using cached valid architectures for osx.<br>
-- OSX supported arches: arm64;arm64e;x86_64;x86_64h<br>
-- Compiler-RT supported architectures: arm64;arm64e;x86_64;x86_64h<br>
-- Configuring done<br>
-- Generating done<br>
 Ok....seems like even I set target to X86 at config.yaml, it is still trying to build arm...</p>



<a name="237832804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20llvm%20failed%20at%20Mac%20OS%2011.3.1/near/237832804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20llvm.20failed.20at.20Mac.20OS.2011.2E3.2E1.html#237832804">(May 07 2021 at 14:35)</a>:</h4>
<blockquote>
<p>config.yaml</p>
</blockquote>
<p>did you mean toml?</p>



<a name="237832885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20llvm%20failed%20at%20Mac%20OS%2011.3.1/near/237832885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20llvm.20failed.20at.20Mac.20OS.2011.2E3.2E1.html#237832885">(May 07 2021 at 14:35)</a>:</h4>
<p>I wouldn't expect that "supported" means "will compile for"</p>



<a name="237847325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/build%20llvm%20failed%20at%20Mac%20OS%2011.3.1/near/237847325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shihao Xia <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/build.20llvm.20failed.20at.20Mac.20OS.2011.2E3.2E1.html#237847325">(May 07 2021 at 16:03)</a>:</h4>
<p>Yes I mean config.toml</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>